<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page session="true"%>
<%@ page pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<title>Ucenter &#8211; Login</title>
		<link type="text/css" rel="stylesheet" href="${ctx}/css/cas.css" />
		<script type="text/javascript" src="js/common_rosters.js"></script>

		<link rel="icon" href="<c:url value="/favicon.ico" />"
			type="image/x-icon" />
		<script type="text/javascript" src="${ctx}/js/jquery.js"></script>
		<script type="text/javascript">
			function onSubmitForm(){
		        $.post('${ctx}/ws/user/login',{ 
			        username: $('#username').val(), password: $('#password').val()
		            }, function(data){
		            	var code=$(data).find("status code").text();
		            	if(code=="0"){
		            		var ticket=$(data).find("data").text();
		            	}
		            },'xml'
		       )
			}
		</script>
	</head>
	<body id="cas" onload="init();" class="fl-theme-iphone">
		<div class="flc-screenNavigator-view-container">
			<div class="fl-screenNavigator-view">
				<div id="content" class="fl-screenNavigator-scroll-container">
					<form method="post" id="loginForm" class="fm-v clearfix">
						<div class="box fl-panel" id="login">
							<!-- <spring:message code="screen.welcome.welcome" /> -->
							<h2>
								<spring:message code="screen.welcome.instructions" />
							</h2>
							<div class="row fl-controls-left">
								<label for="username" class="fl-label">
									<spring:message code="screen.welcome.label.netid" />
								</label>
								<input class="required" type="text" id="username" size="25"
									tabindex="1" accesskey="${userNameAccessKey}" />
							</div>
							<div class="row fl-controls-left">
								<label for="password" class="fl-label">
									<spring:message code="screen.welcome.label.password" />
								</label>
								<spring:message code="screen.welcome.label.password.accesskey"
									var="passwordAccessKey" />
								<input class="required" type="password" id="password" size="25"
									tabindex="2" path="password" accesskey="${passwordAccessKey}"
									htmlEscape="true" autocomplete="off" />
							</div>
							<div class="row btn-row">
								<input type="hidden" name="lt" value="${flowExecutionKey}" />
								<input type="hidden" name="_eventId" value="submit" />

								<input class="btn-submit" name="submit" accesskey="l"
									value="<spring:message code="screen.welcome.button.login" />"
									tabindex="4" type="button" onclick="onSubmitForm()" />
								<input class="btn-reset" name="reset" accesskey="c"
									value="<spring:message code="screen.welcome.button.clear" />"
									tabindex="5" type="reset" />
							</div>
						</div>
					</form>
				</div>
				<div id="footer"
					class="fl-panel fl-note fl-bevel-white fl-font-size-80">
					<div>
						<p>
							Copyright © 1996-2010 Netwaymedia Corporation, All Rights
							Reserved
						</p>
						<p>
							Powered by
							<a href="http://www.netwaymedia.com/uc">Ucenter <%=com.google.code.ucenter.UcenterVersion.getVersion()%></a>
						</p>
					</div>
					<!--<a href="http://www.jasig.org" title="go to Jasig home page"><img id="logo" src="images/ja-sig-logo.gif" width="118" height="31" alt="JA-SIG" title="go to Jasig home page" /></a> -->
				</div>
			</div>
		</div>
	</body>
</html>